@(message: String)
@main2(message) {
    @*<script src="/main2/js/jstree/jquery-1.10.2.min.js" type="text/javascript"></script>*@
    <link rel="stylesheet" href="../main2/css/jstree/style.min.css" />
    <div class="row">
        <div class="col-md-6">
            <div class="portlet light ">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="icon-social-dribbble font-blue-sharp"></i>
                        <span class="caption-subject font-blue-sharp bold uppercase">Basic markup(Populating a tree using HTML)</span>
                    </div>
                </div>
                <div class="portlet-body">
                    <div id="jstree">
                        <ul>
                            //class值：jstree-open（节点展开）,jstree-clicked(标记节点)
                            // data-jstree属性：{"opened":true}（展开）, {"selected":true} （选中）,{"disabled":true} (不可选)，{"icon":"icon address"}图标@*<li id="child_node_1" data-jstree='{"opened":true}'>Root node 1*@
                            <li id="child_node_1" data-jstree='{"opened":true}'>Root node 1
                                <ul>
                                    <li id="child_node_1_1"data-jstree='{"selected":true}'><a href="www.baidu.com">Child node 1</a></li>
                                    <li id="child_node_1_2">Child node 2</li>
                                </ul>
                            </li>
                            <li id="child_node_2">Root node 2</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="portlet light ">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="icon-bubble font-green-sharp"></i>
                        <span class="caption-subject font-green-sharp bold uppercase">Loading with AJAX</span>
                    </div>
                </div>
                <div class="portlet-body">
                    <div id="jstree2">


                    </div>
                </div>
            </div>
        </div>
    </div>

    <button>demo button</button>
    <script src="../main2/js/jstree/jstree.min.js"></script>
    <script>
            $(function () {
                var menuArray=[$("#pre_function"),$("#tree"),$("#tree-jstree")];
                activeMenu( menuArray);
                $('#jstree').jstree({"checkbox" : {"keep_selected_style" : true},"plugins" : [ "checkbox","changed" ,"contextmenu"]});
                //$('#jstree').jstree();
                $('#jstree').on("changed.jstree", function (e, data) {
                   // console.log(data);
                   console.log(data.selected[data.selected.length]);
                    $('#jstree').jstree(true).close_node('child_node_1',5000);
                  // console.log( $('#jstree').jstree(true).close_node('child_node_1',1000));

                });
                /*$('#jstree2').jstree({
                    'core' : {
                        'data' : {
                            'url' : 'tree_data2.json',
                            'data' : function (node) {
                                return { 'id' : node.id };
                            }
                        }
                    }
                });*/
                $('#jstree2').jstree({ 'core' : {
                    'data' : [
                        { "id" : "ajson1", "parent" : "#", "text" : "Simple root nod2e" },
                        { "id" : "ajson2", "parent" : "#", "text" : "Root node 2" },
                        { "id" : "ajson3", "parent" : "ajson2", "text" : "Child 1" },
                        { "id" : "ajson4", "parent" : "ajson2", "text" : "Child 2" },
                    ],
                    "animation":800,//节点展开速度
                   "multiple":true,
                    "worker":false,
                    "themes":{ "stripes":false,icons:false }
                    }, 'plugins':['checkbox','contextmenu','themes','wholerow']

                });
                $('#jstree2').on("changed.jstree", function (e, data) {
                    //销毁所有树 $.jstree.destroy ()
                   // $('#jstree2').jstree(true).close_node('ajson2',5000)
                    $.jstree.defaults.core.themes.variant = "large";
                    $('#jstree2').jstree('close_node', 'ajson2',500);
                    //console.log($.jstree.defaults.core)
                });
            });

    </script>

}


